package com.ruoyi.asset.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.asset.mapper.PropertyAssetMapper;
import com.ruoyi.asset.domain.PropertyAsset;
import com.ruoyi.asset.service.IPropertyAssetService;

/**
 * 物业资产Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-27
 */
@Service
public class PropertyAssetServiceImpl implements IPropertyAssetService 
{
    @Autowired
    private PropertyAssetMapper propertyAssetMapper;

    /**
     * 查询物业资产
     * 
     * @param assetId 物业资产主键
     * @return 物业资产
     */
    @Override
    public PropertyAsset selectPropertyAssetByAssetId(Long assetId)
    {
        return propertyAssetMapper.selectPropertyAssetByAssetId(assetId);
    }

    /**
     * 查询物业资产列表
     * 
     * @param propertyAsset 物业资产
     * @return 物业资产
     */
    @Override
    public List<PropertyAsset> selectPropertyAssetList(PropertyAsset propertyAsset)
    {
        return propertyAssetMapper.selectPropertyAssetList(propertyAsset);
    }

    /**
     * 新增物业资产
     * 
     * @param propertyAsset 物业资产
     * @return 结果
     */
    @Override
    public int insertPropertyAsset(PropertyAsset propertyAsset)
    {
        return propertyAssetMapper.insertPropertyAsset(propertyAsset);
    }

    /**
     * 修改物业资产
     * 
     * @param propertyAsset 物业资产
     * @return 结果
     */
    @Override
    public int updatePropertyAsset(PropertyAsset propertyAsset)
    {
        return propertyAssetMapper.updatePropertyAsset(propertyAsset);
    }

    /**
     * 批量删除物业资产
     * 
     * @param assetIds 需要删除的物业资产主键
     * @return 结果
     */
    @Override
    public int deletePropertyAssetByAssetIds(Long[] assetIds)
    {
        return propertyAssetMapper.deletePropertyAssetByAssetIds(assetIds);
    }

    /**
     * 删除物业资产信息
     * 
     * @param assetId 物业资产主键
     * @return 结果
     */
    @Override
    public int deletePropertyAssetByAssetId(Long assetId)
    {
        return propertyAssetMapper.deletePropertyAssetByAssetId(assetId);
    }
}
